<template>
  <div class="A">
    <h1>我是A</h1>
    <button @click="emitFun">emit</button>
  </div>
</template>

<script setup lang="ts">
import emitter from '../../utils/mitt';
const emitFun = () => {
  emitter.emit('on-mittA', 'mittA')
  emitter.emit('on-mittB', 'mittB')
}

</script>

<style>
.A {
  width: 200px;
  height: 200px;
  color: aquamarine;
  background-color: rgb(42, 131, 172);
}
</style>